Skip to content

Security: Enable Permissions Policy#53

Open
bellisabell wants to merge 3 commits intomainfrom
bell/enable-permissions-policy
Open

Security: Enable Permissions Policy#53
bellisabell wants to merge 3 commits intomainfrom
bell/enable-permissions-policy

Conversation

@bellisabell
Copy link
Copy Markdown
Contributor

Summary

Enables the Permissions Policy HTTP header to restrict browser API access, improving security by reducing the attack surface.

Changes

Configures a strict permissions policy that:

  • Disables sensors: accelerometer, gyroscope, magnetometer, ambient light sensor
  • Disables media devices: camera, microphone
  • Disables location: geolocation
  • Disables hardware APIs: USB, MIDI
  • Disables payment APIs
  • Disables autoplay and picture-in-picture
  • Disables VR/XR features: xr-spatial-tracking
  • Disables interest-based advertising: interest-cohort (FLoC/Topics)
  • Allows fullscreen: from same origin only (for viewing postcards)

Security Impact

This addresses a HIGH severity issue where the entire permissions policy was commented out, leaving all browser APIs unrestricted. The new policy follows the principle of least privilege.

Closes #19

Implements a strict Permissions Policy that restricts unnecessary browser
APIs including:
- Sensors (accelerometer, gyroscope, magnetometer, ambient light)
- Media devices (camera, microphone)
- Location (geolocation)
- Hardware (USB, MIDI)
- Payment APIs
- Autoplay and picture-in-picture
- VR/XR features
- Interest-based advertising (FLoC/Topics)

Only fullscreen is allowed from the same origin.

Closes #19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security: Permissions Policy is completely disabled

2 participants